<template>
    <div>
        <h3>显示</h3>
        <table class="table table-bordered">
            <tbody>
                <tr>
                    <td>序号</td>
                    <td>姓名</td>
                    <td>手机号</td>
                    <td>账号名</td>
                    <td>密码</td>
                    <td>所属角色</td>
                    <td>创建人</td>
                </tr>
                <tr v-for="item in data.list">
                    <td>{{ item.id }}</td>
                    <td>{{ item.name}}</td>
                    <td>{{ item.shouji.substr(0,3)+"****"+item.shouji.substr(7) }}</td>
                    <td>{{ item.zhang }}</td>
                    <td>***</td>
                    <td>{{ item.jiaose }}</td>
                    <td>{{ item.chuangjian }}</td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup lang="ts">
import axios from 'axios';
import {ref,reactive, onMounted} from 'vue'
import {useRoute,useRouter} from 'vue-router'
const route=useRoute();
const router=useRouter();

const data:any=reactive({
   list:[]
})
onMounted(()=>{
    getlist();
})
const getlist=()=>{
    axios({
        url:'/api/Deng/show',
        method:'get',
    })
    .then((res)=>{
        console.log(res);
        data.list=res.data;
    })
    .catch((err)=>{
        console.log(err);
    })
}
</script>

<style scoped>

</style>